package com.edu.bhu.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.bhu.admin.mapper.HouApplyMapper;
import com.edu.bhu.admin.domain.HouApply;
import com.edu.bhu.admin.service.IHouApplyService;
import com.edu.bhu.common.core.text.Convert;

/**
 * 租房申请Service业务层处理
 * 
 * @author zhangkeyi
 * @date 2022-02-22
 */
@Service
public class HouApplyServiceImpl implements IHouApplyService 
{
    @Autowired
    private HouApplyMapper houApplyMapper;

    /**
     * 查询租房申请
     * 
     * @param applyId 租房申请主键
     * @return 租房申请
     */
    @Override
    public HouApply selectHouApplyByApplyId(Long applyId)
    {
        return houApplyMapper.selectHouApplyByApplyId(applyId);
    }

    /**
     * 查询租房申请列表
     * 
     * @param houApply 租房申请
     * @return 租房申请
     */
    @Override
    public List<HouApply> selectHouApplyList(HouApply houApply)
    {
        return houApplyMapper.selectHouApplyList(houApply);
    }

    /**
     * 查询租房申请列表(关联明细)
     *
     * @param houApply 租房申请
     * @return 租房申请集合
     */
    public List<HouApply> selectHouApplyListWithDetail(HouApply houApply)
    {
        return houApplyMapper.selectHouApplyListWithDetail(houApply);
    }

    /**
     * 新增租房申请
     * 
     * @param houApply 租房申请
     * @return 结果
     */
    @Override
    public int insertHouApply(HouApply houApply)
    {
        return houApplyMapper.insertHouApply(houApply);
    }

    /**
     * 修改租房申请
     * 
     * @param houApply 租房申请
     * @return 结果
     */
    @Override
    public int updateHouApply(HouApply houApply)
    {
        return houApplyMapper.updateHouApply(houApply);
    }

    /**
     * 批量删除租房申请
     * 
     * @param applyIds 需要删除的租房申请主键
     * @return 结果
     */
    @Override
    public int deleteHouApplyByApplyIds(String applyIds)
    {
        return houApplyMapper.deleteHouApplyByApplyIds(Convert.toStrArray(applyIds));
    }

    /**
     * 删除租房申请信息
     * 
     * @param applyId 租房申请主键
     * @return 结果
     */
    @Override
    public int deleteHouApplyByApplyId(Long applyId)
    {
        return houApplyMapper.deleteHouApplyByApplyId(applyId);
    }
}
